const expressJwt = require('express-jwt');
const { KEY } = require('./consts');

const jwtAuth = expressJwt({
    secret: 'cxq',//对应生成的token密钥
    algorithms: ['HS256'],
    credentialsRequired: false
}).unless({
    path: ['/users/login', '/users/register', '/users/isAccess', '/users/isHave', '/users/logins',  '/users/registers']
})

module.exports = jwtAuth;